package com.haohuo.filter.model;

import org.springframework.http.HttpCookie;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;

import java.net.InetSocketAddress;
import java.util.Map;

/**
 * @Author: pk.zhang
 * @Date: 2021/3/5 10:40
 */
public class TraceRequest {

    /** 请求ID **/
    String traceID;
    /** query字符串 **/
    MultiValueMap<String, String> queryParams ;
    /** cookies **/
    MultiValueMap<String, HttpCookie> cookies ;
    /** headers**/
    HttpHeaders headers ;
    /** path**/
    String path ;
    /** attributes**/
    Map<String, Object> attributes ;
    /** remoteAddress **/
    InetSocketAddress remoteAddress ;
    /** startTime **/
    String startTime;
    /** 存储请求报文 **/
    private String reqJson;

    public String getTraceID() {
        return traceID;
    }

    public void setTraceID(String traceID) {
        this.traceID = traceID;
    }

    public MultiValueMap<String, String> getQueryParams() {
        return queryParams;
    }

    public void setQueryParams(MultiValueMap<String, String> queryParams) {
        this.queryParams = queryParams;
    }

    public MultiValueMap<String, HttpCookie> getCookies() {
        return cookies;
    }

    public void setCookies(MultiValueMap<String, HttpCookie> cookies) {
        this.cookies = cookies;
    }

    public HttpHeaders getHeaders() {
        return headers;
    }

    public void setHeaders(HttpHeaders headers) {
        this.headers = headers;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Map<String, Object> getAttributes() {
        return attributes;
    }

    public void setAttributes(Map<String, Object> attributes) {
        this.attributes = attributes;
    }

    public InetSocketAddress getRemoteAddress() {
        return remoteAddress;
    }

    public void setRemoteAddress(InetSocketAddress remoteAddress) {
        this.remoteAddress = remoteAddress;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getReqJson() {
        return reqJson;
    }

    public void setReqJson(String reqJson) {
        this.reqJson = reqJson;
    }

    @Override
    public String toString() {
        return "TraceRequest{" +
                "traceID='" + traceID + '\'' +
                ", queryParams=" + queryParams +
                ", cookies=" + cookies +
                ", headers=" + headers +
                ", path='" + path + '\'' +
                ", attributes=" + attributes +
                ", remoteAddress=" + remoteAddress +
                ", startTime='" + startTime + '\'' +
                ", reqJson='" + reqJson + '\'' +
                '}';
    }
}
